]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginDialog: don't ever call _reset directly
authorRay Strode <rstrode@redhat.com>
Sun, 28 Jul 2013 19:55:09 +0000 (15:55 -0400)
committerRay Strode <rstrode@redhat.com>
Thu, 1 Aug 2013 20:08:23 +0000 (16:08 -0400)
The only time we ever call _reset directly is when
detecting changes to disable-user-list.  We can implicitly
trigger a reset for this case, just as easily by calling
this._authPrompt.reset()

This commit makes that change for consistency and to make
it easier to adjust the authprompt workflow later.

https://bugzilla.gnome.org/show_bug.cgi?id=683437

js/gdm/loginDialog.js

index 1651af94ff05f04c07de94f09c6201dc1b7791fc..40a4799dbae997ee371aca951d954b1e4ee7081b 100644 (file)
@@ -451,7 +451,7 @@ const LoginDialog = new Lang.Class({
 
         this._authPrompt = new AuthPrompt.AuthPrompt(gdmClient, AuthPrompt.AuthPromptMode.UNLOCK_OR_LOG_IN);
         this._authPrompt.connect('prompted', Lang.bind(this, this._onPrompted));
-        this._authPrompt.connect('reset', Lang.bind(this, this._reset));
+        this._authPrompt.connect('reset', Lang.bind(this, this._onReset));
         this._authPrompt.hide();
 
         this._authPrompt.actor.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
@@ -530,7 +530,7 @@ const LoginDialog = new Lang.Class({
             this._disableUserList = disableUserList;
 
             if (!this._authPrompt.verifyingUser)
-                this._reset();
+                this._authPrompt.reset();
         }
     },
 
@@ -575,10 +575,7 @@ const LoginDialog = new Lang.Class({
         this._showPrompt();
     },
 
-    _reset: function() {
-        if (this._authPrompt.verifyingUser)
-            return;
-
+    _onReset: function() {
         this._sessionMenuButton.updateSensitivity(true);
 
         this._user = null;